.class final Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;
.super Ljava/lang/Thread;
.source "BaseZMMobAgent.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/zuiapps/sdk/analytics/BaseZMMobAgent;->postData(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field final synthetic val$eventJsonStr:Ljava/lang/String;

.field final synthetic val$mContext:Landroid/content/Context;

.field final synthetic val$mHandler:Landroid/os/Handler;

.field final synthetic val$userId:Ljava/lang/String;


# direct methods
.method constructor <init>(Landroid/content/Context;Ljava/lang/String;Landroid/os/Handler;Ljava/lang/String;)V
    .registers 5

    .prologue
    .line 41
    iput-object p1, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$mContext:Landroid/content/Context;

    iput-object p2, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$eventJsonStr:Ljava/lang/String;

    iput-object p3, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$mHandler:Landroid/os/Handler;

    iput-object p4, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$userId:Ljava/lang/String;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .registers 11

    .prologue
    .line 44
    iget-object v6, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$mContext:Landroid/content/Context;

    invoke-static {v6}, Lcom/zuiapps/sdk/analytics/db/AnalyticsSettingDBUtil;->getLastPostDataTime(Landroid/content/Context;)J

    move-result-wide v4

    .line 45
    .local v4, "lastTime":J
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    .line 46
    .local v2, "currTime":J
    sub-long v6, v2, v4

    iget-object v8, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$mContext:Landroid/content/Context;

    invoke-static {v8}, Lcom/zuiapps/sdk/analytics/db/AnalyticsSettingDBUtil;->getPostDataDelay(Landroid/content/Context;)J

    move-result-wide v8

    cmp-long v6, v6, v8

    if-gtz v6, :cond_1e

    .line 47
    iget-object v6, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$mContext:Landroid/content/Context;

    iget-object v7, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$eventJsonStr:Ljava/lang/String;

    # invokes: Lcom/zuiapps/sdk/analytics/BaseZMMobAgent;->saveAnalyticsData(Landroid/content/Context;Ljava/lang/String;)V
    invoke-static {v6, v7}, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent;->access$000(Landroid/content/Context;Ljava/lang/String;)V

    .line 94
    :goto_1d
    return-void

    .line 50
    :cond_1e
    iget-object v6, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$mContext:Landroid/content/Context;

    invoke-static {v6, v2, v3}, Lcom/zuiapps/sdk/analytics/db/AnalyticsSettingDBUtil;->setLastPostDataTime(Landroid/content/Context;J)V

    .line 52
    iget-object v6, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$mContext:Landroid/content/Context;

    invoke-static {v6}, Lcom/zuiapps/sdk/analytics/db/AnalyticsDBUtil;->getInstance(Landroid/content/Context;)Lcom/zuiapps/sdk/analytics/db/AnalyticsDBUtil;

    move-result-object v6

    invoke-virtual {v6}, Lcom/zuiapps/sdk/analytics/db/AnalyticsDBUtil;->queryList()Ljava/util/List;

    move-result-object v0

    .line 53
    .local v0, "analysisList":Ljava/util/List;, "Ljava/util/List<Lcom/zuiapps/sdk/analytics/greendao/AnalysisModel;>;"
    iget-object v6, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$eventJsonStr:Ljava/lang/String;

    invoke-static {v0, v6}, Lcom/zuiapps/sdk/analytics/parse/BaseAnalyticsParse;->createJsonStrsForBatch(Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 54
    .local v1, "jsonStrs":Ljava/lang/String;
    iget-object v6, p0, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;->val$mHandler:Landroid/os/Handler;

    new-instance v7, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1$1;

    invoke-direct {v7, p0, v1, v0}, Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1$1;-><init>(Lcom/zuiapps/sdk/analytics/BaseZMMobAgent$1;Ljava/lang/String;Ljava/util/List;)V

    invoke-virtual {v6, v7}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_1d
.end method
